import Vue from "vue";

import Cookies from "js-cookie";

import "normalize.css/normalize.css"; // 重置css


import 'aliyun-aliplayer' //阿里云播放器


import "ant-design-vue/dist/antd.css";
import qyForm from "@/utils/qyForm";
import PDF from '@/utils/pdf'
import Vant from "vant"; //移动端组件
import Element from "element-ui";
import { Cascader, Radio, Empty } from "ant-design-vue"; //antd
import "@/assets/mobile/font_2916258_61nplt20lgx/iconfont.js";
import "vant/lib/index.css";
import "./styles/element-variables.scss";
import "@/styles/index.scss"; // 全局css
import moment from "moment";
import VideoPlayer from "vue-video-player";
// import 'vue-video-player/src/custom-theme.css'
// import 'vue-video-player/node_modules/video.js/dist/video-js.css'
require("video.js/dist/video-js.css");
require("vue-video-player/src/custom-theme.css");
import VueTouch from "vue-touch";
import htmlToPdf from "@/utils/htmltoPDF";
import platform from "@/utils/platform";
import Print from "vue-print-nb";
import lrz from "lrz"; //文件压缩
// import face from '@/components/Face/index.js'
import SignCanvas from "sign-canvas";

import { platformAnhui } from "@/utils";

import App from "./App";
import store from "./store";
import router from "./router";
import "./permission"; // 权限控制
import * as filters from "./filters"; // 全局筛选器
import upload from "./components/Upload/index.js";

import sealImgList from "@/utils/sealImgList.js";

// // 引入 Vconsole
// import Vconsole from 'vconsole'
// // 所有环境均使用
// new Vconsole()

Vue.use(upload); //全局注册上传按钮
Vue.use(VueTouch, { name: "v-touch" });
VueTouch.config.swipe = {
  threshold: 50, //设置左右滑动的距离
};
Vue.use(Element, {
  size: Cookies.get("size") || "medium", // 设置element-ui 默认 size
});
Vue.use(VideoPlayer); //视频播放控件
Vue.use(Cascader); //全局antd 组件
Vue.use(Radio); //全局antd 组件
Vue.use(Empty); //全局antd 组件
Vue.use(htmlToPdf); //导出pdf
Vue.use(Print); //打印pdf
Vue.use(Vant); //Vant 组件
Vue.use(platform); //平台信息组件
Vue.use(SignCanvas);
Vue.use(PDF);

// Vue.use(lrz)
// 注册全局筛选器
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});

Vue.prototype.$moment = moment; //全局使用 $moment 日期格式化工具
Vue.prototype.$lrz = lrz;
Vue.prototype.qyType = qyForm;
Vue.prototype.platformAnhui = platformAnhui;
Vue.prototype.sealImgList = sealImgList; //企业用章

Vue.config.productionTip = false;

new Vue({
  beforeCreate() {
    Vue.prototype.$bus = this;
  },
  el: "#app",
  router,
  store,
  render: (h) => h(App),
});
